package GJAM.MVC;

import javax.microedition.lcdui.CommandListener;
import javax.microedition.midlet.MIDlet;

public abstract class Controller extends MIDlet implements CommandListener  {
    
    private ViewCollection views = new ViewCollection();
    
    public void register(View view) {
        views.addView(view);
    }
    
    protected void updateViews() {
        for (int i = 0; i < views.size(); i++) {
            views.viewAtIndex(i).update();
        }
    }
   
}
